Methods and apparatuses for synchronizing data based on blockchain integrated station

ABSTRACT

Computer-implemented methods, apparatuses, and systems are provided for synchronizing data based on a blockchain integrated station. The blockchain integrated station includes a central processing unit (CPU) and an intelligent network card. The intelligent network card includes a processor different from the CPU. The blockchain integrated station serves as a blockchain node of a blockchain network, and the intelligent network card is configured to inquiry other blockchain nodes of the blockchain network on whether there is to-be-synchronized block data; in response to determining that there is the to-be-synchronized block data, pull the to-be-synchronized block data from the other nodes of the blockchain network; and provide the to-be-synchronized block data to the CPU.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.202010653797.0, filed on Jul. 8, 2020, which is hereby incorporated byreference in its entirety.

TECHNICAL FIELD

The present disclosure relates the field of information technologies,and in particular, to methods and apparatuses for synchronizing databased on a blockchain integrated station.

BACKGROUND

Blockchain technology (also referred to as distributed ledgertechnology) is a decentralized distributed database technology havingcharacteristics such as publicity, transparency, immutability andtrustability, and thus it is applicable to many application scenarioswith high demands for data reliability.

In an actual application, a node in a blockchain network usually needsto synchronize block data from other nodes. At present, synchronizationoperation of block data is generally performed by a central processingunit (CPU) of a node.

Based on the exited technology, a method for synchronizing block datawith a higher efficiency is needed.

SUMMARY

In order to solve the lower efficiency problem of existing methods ofsynchronizing blockchain data, embodiments of the present disclosureprovide methods and apparatuses for synchronizing data based on ablockchain integrated station. The following technical solutions areadopted:

According to a first aspect of embodiments of the present disclosure,provided is a method for synchronizing data based on a blockchainintegrated station. The blockchain integrated station includes a centralprocessing unit CPU and an intelligent network card. The blockchainintegrated station is any node of a blockchain network. The methodincludes:

inquiring, by the intelligent network card, other nodes about whetherthere is to-be-synchronized block data;

pulling, by the intelligent network card, the to-be-synchronized blockdata from the other nodes if it is determined there is theto-be-synchronized block data;

providing, by the intelligent network card, the to-be-synchronized blockdata to the CPU;

completing, by the CPU, data synchronization based on theto-be-synchronized block data.

According to a second aspect of embodiments of the present disclosure,provided is a method for synchronizing data based on a blockchainintegrated station. The method is applied to an intelligent network cardof the blockchain integrated station. The blockchain integrated stationfurther includes a CPU. The blockchain integrated station is any node ofa blockchain network. The method includes:

inquiring other nodes about whether there is to-be-synchronized blockdata;

pulling the to-be-synchronized block data from the other nodes if it isdetermined there is the to-be-synchronized block data;

providing the to-be-synchronized block data to the CPU.

According to a third aspect of embodiments of the present disclosure,provided is a method for synchronizing data based on a blockchainintegrated station. The method is applied to a CPU of the blockchainintegrated station. The blockchain integrated station further includesan intelligent network card. The blockchain integrated station is anynode of a blockchain network. The method includes:

completing data synchronization based on to-be-synchronized block data.

According to a fourth aspect of embodiments of the present disclosure,provided is an apparatus for synchronizing data based on a blockchainintegrated station. The apparatus is applied to an intelligent networkcard of the blockchain integrated station. The blockchain integratedstation further includes a CPU. The blockchain integrated station is anynode of a blockchain network. The apparatus includes:

an inquiring module, configured to inquire other nodes about whetherthere is to-be-synchronized block data;

a pulling module, configured to pull the to-be-synchronized block datafrom the other nodes if it is determined there is the to-be-synchronizedblock data; and

a providing module, configured to provide the to-be-synchronized blockdata to the CPU.

According to a fifth aspect of embodiments of the present disclosure,provided is an apparatus for synchronizing data based on a blockchainintegrated station. The apparatus is applied to a CPU of the blockchainintegrated station. The blockchain integrated station further includesan intelligent network card. The blockchain integrated station is anynode of a blockchain network. The apparatus includes:

a synchronizing module, configured to complete data synchronizationbased on to-be-synchronized block data.

In the technical solutions according to the embodiments of the presentdisclosure, the blockchain integrated station includes a CPU and anintelligent network card, and the intelligent network card is a networkcard having a built-in processor or microprocessor and can perform datacomputation and processing. The intelligent network card can replace theCPU to perform data synchronization inquiry and to-be-synchronized blockdata pulling, and the CPU performs data synchronization based on theto-be-synchronized data sent by the intelligent network card.

According to the embodiments of the present disclosure, the followingtechnical effects can be achieved by transferring operations such asdata inquiry and data pulling involved in block data synchronizationthat needs frequent network interaction with other nodes from the CPU tothe intelligent network card.

1. The intelligent network card is specifically in charge of inquiry andpulling of to-be-synchronized data, while the CPU focuses onsynchronization of to-be-synchronized block data. In this case, theoperation efficiency of the blockchain integrated station serving as anode can be improved, and the CPU can also execute more transactionswithin a unit time, thereby improving throughput.2. The intelligent network card performs inquiry operation and blockdata pulling operation, resulting in smaller delay.

It should be understood that the above general descriptions and thesubsequent detailed descriptions are merely examples and explanatory,and are not intended to limit the embodiments of the present disclosure.

In addition, any of the embodiments of the present disclosure is notrequired to achieve all effects described above.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure or in the exited technology more clearly, drawings requiredin descriptions of the embodiments of the present disclosure or theexited technology will be briefly introduced below. It is clear that thedrawings described below are merely some embodiments of the presentdisclosure and other drawings can also be obtained by those of ordinaryskill in the art based on these drawings.

FIG. 1 is a structural schematic diagram of a blockchain integratedstation according to embodiments of the present disclosure.

FIG. 2 is a structural schematic diagram of a blockchain systemaccording to embodiments of the present disclosure.

FIG. 3 is a flowchart of a method for processing a transaction based ona blockchain integrated station according to embodiments of the presentdisclosure.

FIG. 4 is a flowchart of a method for synchronizing data based on ablockchain integrated station according to embodiments of the presentdisclosure.

FIG. 5 is a flowchart of a method for forwarding a transaction based ona blockchain integrated station according to embodiments of the presentdisclosure.

FIG. 6 is a flowchart of a method for identifying a replay transactionbased on a blockchain integrated station according to embodiments of thepresent disclosure.

FIG. 7 is a flowchart of a method for identifying a to-be-filteredtransaction based on a blockchain integrated station according toembodiments of the present disclosure.

FIG. 8 is a structural schematic diagram of an apparatus for processinga transaction based on a blockchain integrated station according toembodiments of the present disclosure.

FIG. 9 is a structural schematic diagram of an apparatus for processinga transaction based on a blockchain integrated station according toembodiments of the present disclosure.

FIG. 10 is a structural schematic diagram of an apparatus forsynchronizing data based on a blockchain integrated station according toembodiments of the present disclosure.

FIG. 11 is a structural schematic diagram of an apparatus forsynchronizing data based on a blockchain integrated station according toembodiments of the present disclosure.

FIG. 12 is a structural schematic diagram of an apparatus for forwardinga transaction based on a blockchain integrated station according toembodiments of the present disclosure.

FIG. 13 is a structural schematic diagram of an apparatus foridentifying a replay transaction based on a blockchain integratedstation according to embodiments of the present disclosure.

FIG. 14 is a structural schematic diagram of an apparatus foridentifying a to-be-filtered transaction based on a blockchainintegrated station according to embodiments of the present disclosure.

FIG. 15 is a structural schematic diagram of a computer device forconfiguring a method of embodiments of the present disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS

In the early stage of development of the blockchain technology, usersmostly add their own personal computer (PC) and laptop computer and thelike into a blockchain network to become a blockchain node in theblockchain network. At this time, the stage can be called 1.0architecture era of blockchain network, in which the behaviors of usersto participate in the blockchain network are autonomous and the usersalso need to perform autonomous maintenance, for example, performmaintenance and configuration and so on for their devices (for example,PC) participating in the blockchain network. Along with continuousdevelopment of the blockchain technology, especially along withincreasing needs of users for infrastructures with high performance andhigh availability, the blockchain network develops into 2.0 architectureera based on cloud service. In the 2.0 architecture era, cloud serviceproviders provide the infrastructures with high performance and highavailability to the users based on higher-performance servers and cloudcomputing, so as to configure and form blockchain nodes required by theusers. To satisfy the needs of users for privatization and security andthe like of the blockchain network, it is necessary to perform furtherarchitecture upgrade to the blockchain network, thereby realizing 3.0architecture era based on blockchain integrated station.

Software and hardware integration can be realized for the blockchainintegrated station. When providing a blockchain integrated station, aprovider will not only provide hardware devices of the blockchainintegrated station to users but also provide software configurations forrealizing deep optimizations of the hardware devices integrated into theblockchain integrated station, thereby realizing the software-hardwareintegration.

Hardware optimization can be realized for the blockchain integratedstation. For example, a dedicated smart contract processing chip can bedeployed on the blockchain integrated station. For example, the smartcontract processing chip can be Field Programmable Gate Array (FPGA)chip, or another type of chip to increase the processing efficiency fora smart contract. A hardware root-of-trust key can be deployed on thesmart contract processing chip, for example, the hardware root-of-trustkey can be pre-programmed by the provider into the smart contractprocessing chip and the provider can also know a public keycorresponding to the hardware root-of-trust key (for example, the key isdisclosed). Therefore, the smart contract processing chip can sendnegotiation information to the provider and sign the negotiationinformation by using the hardware root-of-trust key, so that theprovider can verify the signature based on the corresponding public key;and, after successful signature verification, it is ensured that thesmart contract processing chip and the provider obtain the same keythrough negotiation based on the negotiation information. The negotiatedkey can include an image deployment key, and thus the provider canencrypt and transmit a binary disk image needed by the blockchain nodeto the smart contract processing chip based on the image deployment key,and the smart contract processing chip can decrypt and deploy the binarydisk image based on the image deployment key. The negotiated key caninclude a service secret deployment key, and thus the provider canencrypt and transmit a node private key of the blockchain node, aservice root key of the blockchain node, etc., to the smart contractprocessing chip based on the service secret deployment key, and thesmart contract processing chip can obtain and deploy the node privatekey and the service root key and the like based on the service secretdeployment key to satisfy the privacy transaction needs in a blockchainscenario. For example, the node private key corresponds to a node publickey, and thus a client device can perform encryption and transmissionfor a blockchain transaction by using the node public key, and theblockchain node can perform decryption by using the node private key.The service root key is a symmetric key which can be used to performencrypted storage for service data such as contract codes and value ofcontract status and the like. The service root key may not be directlyused, and the smart contract processing chip can perform encryption anddecryption through a derivation key of the service root key to reducethe security risk of the service root key. Through reliable managementfor the node private key and the service root key (or its derivationkey), data will be always in encrypted state unless processed by thesmart contract processing chip. Therefore, the smart contract processingchip actually forms a Trusted Execution Environment (TEE) of hardware onthe blockchain integrated station, so as to ensure the data requiringprivacy protection such as transactions, contract codes, and contractstatuses will not be leaked.

For another example, an intelligent network card can be deployed on theblockchain integrated station. In addition to realizing a traditionalnetwork card function, the intelligent network card also can replace orassist a CPU of the blockchain integrated station to perform partialfunctions so as to offload computation of the CPU. Especially, theoperations with intensive network I/O can be transferred from CPU to theintelligent network card to perform, so that the CPU can process morecomputation-intensive operations, for example, transaction execution,and storage processing and the like. Compared with other components (forexample, CPU) on the blockchain integrated station, the intelligentnetwork card is closer to the network regardless of physical level orlogical level, so the intelligent network card can always obtain datatransmitted in the network preferentially. Therefore, with no storageaccess or a small amount of storage access is involved, the intelligentnetwork card can process these data with a relatively higher processingefficiency and a relatively smaller delay, and a relatively largerthroughput, so as to achieve a higher performance benefit with a lowercost. For example, in consensus algorithm, there is almost no need toaccess storage except in the cases of change of network status, additionand deletion of node, change of consensus configuration and the like.Therefore, the consensus operation can be completed by the intelligentnetwork card and only need to inform the CPU of a consensus result.Therefore, the CPU is not required to directly participate in theconsensus process, thereby significantly improving the consensusefficiency. Similarly, the same effect can be achieved in forwardingtransactions by the intelligent network card and achieving blocksynchronization by the intelligent network card on a newly-addedblockchain node and the like and will not be repeated herein.Furthermore, after receiving transactions, the intelligent network cardcan identify or filter out a replay transaction by comparing thereceived transaction with historical transactions, for example,comparing data fields of sender information of transaction, destinationaddress, time stamp, and hash value and the like. The intelligentnetwork card can also perform content analysis for those receivedtransactions, so as to filter out illegal transactions or predefinedundesired transactions and the like as a supplementation to layer-2 orlayer-3 packet filtering implemented by a switch.

For another example, a cryptographic acceleration card which is alsocalled a high-speed cryptographic card can be deployed on the blockchainintegrated station. The cryptographic acceleration card can realizetotal encrypted memory, defend against side-channel attacks by hardwarereinforcement, and also realize physical protection against approachessuch as probe, laser and the like, having very high security. Forexample, the cryptographic acceleration card used on the blockchainintegrated station can have level-2 qualification from the StateCryptography Administration, level-3 qualification from the StateCryptography Administration and the like. When the cryptographicacceleration card is deployed, the hardware roof-of-trust key asdescribed above can be maintained in the cryptographic accelerationcard, and the cryptographic acceleration card can perform signatureoperation based on the hardware roof-of-trust key and replace or assistthe smart contract processing chip to complete the operations such asthe key negotiation as described above. Similarly, the cryptographicacceleration card can be used to maintain a public key so that thecryptographic acceleration card can realize signature verificationoperation based on the maintained public key. In short, at least part ofoperations relating to key management, encryption and decryption, andsignature verification and the like on the blockchain integrated stationcan be handed over to the cryptographic acceleration card, so that veryhigh security can be realized and task offloading can be realized forthe CPU of the blockchain integrated station or the smart contractprocessing chip, thereby improving the processing efficiency.

Software optimization can be realized for the blockchain integratedstation. For example, a certificate authority service can be built inthe blockchain integrated station to realize automatic certificateissuing, node identity authentication, automatic blockchainconstruction, and automatic adding of blockchain node, thereby realizingthe plug and play of the blockchain integrated station. In this case, auser can realize fast deployment of the blockchain integrated station.In addition to quickly establishing a private blockchain network among aplurality of blockchain integrated stations, the blockchain integratedstation can integrate a standardized on-cloud service interface toenable the blockchain integrated station to automatically connect toon-cloud service, thereby realizing hybrid deployment between theblockchain integrated station and the cloud-deployed blockchain node toconstruct a hybrid blockchain network. The blockchain integrated stationcan also integrate a standardized cross-chain service interface toenable the blockchain integrated station to realize cross-chain servicesbased on a standardized cross-chain protocol or standardized cross-chainservice, thereby greatly expanding the application scenarios of theblockchain integrated station, and satisfying the cross-chain needs ofusers. For example, cross-chain data interaction between differentblockchain networks is achieved, and for another example, cross-chaindata interaction between the blockchain network and an off-chaincomputing node and the like is achieved (for example, the off-chaincomputing node shares computation task for the blockchain node and thelike).

The technical solution according to each embodiment of the presentdisclosure will be described in detail below in combination with thedrawings.

FIG. 1 is a structural schematic diagram of a blockchain integratedstation according to embodiments of the present disclosure. As shown inFIG. 1 , the blockchain integrated station includes a Central ProcessingUnit (CPU) and an intelligent network card. Different from a traditionalnetwork card only supporting network communication, the intelligentnetwork card of the present disclosure is a network card with a built-inprocessor or microprocessor (e.g., an ARM processor), and thus hascertain data computing and processing capability. Certainly, it can beunderstood that the blockchain integrated station as a node of ablockchain network also includes a memory not shown in FIG. 1 . Thememory is used to store a blockchain itself, or the memory is also usedto store a state database for an Ethereum blockchain.

In addition, the blockchain integrated station can further include otherhardware, such as a smart contract processing chip and a cryptographicacceleration card.

FIG. 2 is a structural schematic diagram of a blockchain systemaccording to embodiments of the present disclosure. The blockchainsystem includes a blockchain network. In the blockchain network, atleast one node can serve as a blockchain integrated station. That is,the blockchain integrated station as a node can interact with othernodes (common nodes) which are not blockchain integrated stations, orcan interact with other nodes which are also blockchain integratedstations. For convenience of description, the technical solutions willbe described with a single blockchain integrated station herein.

FIG. 3 is a flowchart of a method for processing a transaction based ona blockchain integrated station according to embodiments of the presentdisclosure. The method includes the following steps.

At step S300, when the blockchain integrated station receives atransaction through an intelligent network card, the intelligent networkcard writes the received transaction into a network card cache.

It is well known that a blockchain network usually processes atransaction in three stages, i.e. a transaction reception stage, aconsensus stage and a transaction execution and chaining stage. Firstly,the above three stages will be briefly introduced herein.

In the transaction reception stage, each node in the blockchain networkreceives and caches a transaction to prepare for subsequent consensusand transaction execution. Specifically, a client device constructs atransaction and submits the transaction to any node in the blockchainnetwork, so that the node directly receives and caches the transaction,and broadcasts the transaction to the entire network to enable othernodes to indirectly receive the transaction. The blockchain integratedstation receiving the transaction through the intelligent network cardat step 300 can refer to that the blockchain integrated station directlyreceives the transaction, or the blockchain integrated stationindirectly receives the transaction. In summary, regardless of directreception or indirect reception, it is important that most nodes in theblockchain network card will cache the same transaction. It can beunderstood that in an actual application, a small number of nodes maynot receive the transaction due to shutdown or network problem, which,however, will not affect the operation of a distributed blockchainnetwork.

In the consensus stage, various nodes of the blockchain network performinteraction based on a consensus algorithm (e.g., Byzantine faulttolerance algorithm) to achieve message consistency, that is, to reach aconsensus for which received transactions are to be executed this time.It can be understood that in the actual application, not every nodeparticipates in the consensus. However, since the consensus algorithmhas fault tolerance, a consensus result will not be affected.

In the transaction execution and chaining stage, each node will obtain atransaction from the cache for execution based on the consensus result,and the obtained transaction is then packaged into a block and writteninto the blockchain (i.e., transaction chaining) after execution.

The cache introduced above usually refers to a cache of a CPU of a node.In the embodiments of the present disclosure, since an intelligentnetwork card is configured for the node, the cache can include a networkcard cache and a CPU cache. In the transaction reception stage, theintelligent network card writes a transaction into the network cardcache so as to perform subsequent blockchain consensus based on thetransaction in the network card cache.

At step S302, in the process of the blockchain integrated stationparticipating in the blockchain consensus, the intelligent network cardperforms consensus interaction with other nodes of the blockchainnetwork based on the transaction in the network card cache.

In the consensus stage, the intelligent network card replaces the CPU toactually participate in the consensus and perform consensus interactionwith other nodes. Network traffic generated in the consensus processdirectly enters the intelligent network card, and the intelligentnetwork card processes the network traffic based on the consensusalgorithm and directly feeds back a processing result. Therefore, thenetwork traffic will not flow through the CPU.

At step S304, the intelligent network card determines a to-be-executedtransaction list based on the consensus result, and sends theto-be-executed transaction list to the CPU.

It is well known that the blockchain network performs consensusrepeatedly according to a particular consensus trigger condition. Forexample, the consensus trigger condition can be that one consensus isperformed every ten minutes, which means that the blockchain networkdetermines one batch of to-be-executed transactions every ten minutes,and packages this batch of to-be-executed transactions into a block forchaining. The consensus result actually refers to those to-be-executedtransactions determined in one blockchain consensus.

It should be noted herein that access operation for blockchain storage(blockchain and state database) generally needs to be performed by theCPU for efficiency. In an actual application, Practical Byzantine FaultTolerance (PBFT) algorithm is usually adopted, but it is not required toaccess the blockchain storage (blockchain and state database) for a hostchange operation involved in the PBFT algorithm process. Therefore, theCPU neither actually participates in the consensus process nor adverselyaffects efficiency of storage access.

Specifically, the to-be-executed transaction list described at step S304can be a list formed by the to-be-executed transactions determined bythe present blockchain consensus, or can be a list formed by transactionidentifiers (e.g., transaction hashes) of the to-be-executedtransactions determined by the present blockchain consensus.

When the to-be-executed transaction list includes transaction hashes,the intelligent network card also needs to send the to-be-executedtransactions to the CPU. In an actual application, the intelligentnetwork card can send the received transactions to the CPU while writingthe received transactions into the network card cache in the transactionreception stage. The CPU writes the received transactions into the CPUcache.

At step S306, the CPU executes transactions based on the to-be-executedtransaction list and completes transaction chaining.

In embodiments of the present disclosure, in the process that theblockchain integrated station participates in the blockchain consensus,the intelligent network card sends consensus configuration modificationinformation to the CPU if receiving the consensus configurationmodification information. The CPU can modify a consensus configurationlocally stored in the blockchain integrated station based on theconsensus configuration modification information.

Since it is needed to access the blockchain storage for the operation ofmodifying the consensus configuration (for example, adding or deletingnode; for another example, determining a capacity size of one batch ofto-be-executed transactions, i.e. a batch size, in one consensus), theoperation needs to be performed by the CPU for efficiency of storageaccess. Normally, if the modification of consensus configuration is notinvolved in the consensus process, the CPU will not participate in theconsensus.

In addition, execution results generated by the CPU by executingtransactions based on the to-be-executed transaction list are returnedto the intelligent network card, and these execution results arereference information needed by the intelligent network card forparticipation in the next consensus. For example, the CPU executes atransaction initiated by an account A, which consumes 100 GAS of theaccount A with only 50 GAS left in the account A. This means that theaccount A cannot provide sufficient GAS for other transactions initiatedby the account A. In this case, the CPU sends this execution result tothe intelligent network card, and the intelligent network card will nottend to determine other transactions initiated by the account A asto-be-executed transactions in the next consensus.

According to the method shown in FIG. 3 , the blockchain integratedstation includes a CPU and an intelligent network card, and theintelligent network card is a network card having a built-in processoror microprocessor and can perform data computing and processing. Theintelligent network card replaces the CPU to actually participate in ablockchain consensus on behalf of the blockchain integrated station, andsends a to-be-executed transaction list to the CPU for transactionexecution and transaction chaining based on the present consensusresult.

According to the embodiments of the present disclosure, the followingtechnical effects can be achieved by transferring operations such asblockchain consensus that needs frequent network interaction with othernodes from the CPU to the intelligent network card.

1. The intelligent network card is specifically in charge of blockchainconsensus, while the CPU focuses on transaction execution andtransaction chaining. In this case, the operation efficiency of theblockchain integrated station serving as a node can be improved, and theCPU can also execute more transactions within a unit time, therebyimproving throughput.2. In a blockchain consensus process, the network traffic does not needto flow through the CPU but is received by the intelligent network cardfor direct processing and feedback. Thus, the CPU does not participatein the consensus process, so that the feedback delay of the blockchainintegrated station in the consensus process is reduced.

FIG. 4 is a flowchart of a method for synchronizing data based on ablockchain integrated station according to embodiments of the presentdisclosure. The method includes the following steps.

At step S400, an intelligent network card inquires other nodes aboutwhether there is to-be-synchronized block data.

Generally, when there is a newly-added node in a blockchain network, thenode needs to pull block data from other nodes for synchronization. Inaddition, in other cases, sometimes the node also needs to pull blockdata from other nodes, which will not be repeated herein.

To determine whether need to perform data synchronization currently, thenode usually needs to frequently inquire other nodes about whether thereis to-be-synchronized block data, which will involve frequent I/Ooperations. In embodiments of the present disclosure, the intelligentnetwork card is in charge of inquiring other nodes about whether thereis to-be-synchronized block data, so as to offload this part ofoperation burden of the CPU, thereby improving the processing efficiencyof the CPU.

At step S402, if it is determined that there is to-be-synchronized blockdata, the intelligent network card pulls the to-be-synchronized blockdata from other nodes.

After determining that there is to-be-synchronized block data in othernodes, the node needs to pull the to-be-synchronized block data fromother nodes. This means that the node needs to maintain a process ofpulling data from network and take time to wait for completion of datapulling. If this part of operation is handed over to the intelligentnetwork card for execution, operation burden can also be offloaded forthe CPU, thereby improving the operation efficiency of the CPU.

At step S404, the intelligent network card provides theto-be-synchronized block data to the CPU.

Specifically, the intelligent network card can directly send theto-be-synchronized block data to the CPU, or writes theto-be-synchronized block data into a public cache between theintelligent network card and the CPU, and the CPU can obtain theto-be-synchronized block data from the public cache. For example, theCPU can obtain the to-be-synchronized block data from the public cachefor data synchronization in an idle time.

At step S406, the CPU completes data synchronization based on theto-be-synchronized block data.

After obtaining the to-be-synchronized block data, the intelligentnetwork card sends the to-be-synchronized block data to the CPU. At thistime, the CPU only needs to write the to-be-synchronized block data intoa local blockchain of the node without consuming excessive resource andtime.

According to the method shown in FIG. 4 , a blockchain integratedstation includes a CPU and an intelligent network card, and theintelligent network card is a network card having a built-in processoror microprocessor and can perform data computing and processing. Theintelligent network card can replace the CPU to actually participate ina blockchain consensus on behalf of the blockchain integrated station,and sends a to-be-executed transaction list to the CPU for transactionexecution and transaction chaining based on the present consensusresult.

According to the embodiments of the present disclosure, the followingtechnical effects can be achieved by transferring operations such asblockchain consensus that needs frequent network interaction with othernodes from the CPU to the intelligent network card.

1. The intelligent network card is specifically in charge of blockchainconsensus, while the CPU focuses on transaction execution andtransaction chaining. In this case, the operation efficiency of theblockchain integrated station serving as a node is improved, and the CPUcan also execute more transactions within a unit time, thereby improvingthroughput.2. In a blockchain consensus process, the network traffic does not needto flow through the CPU but is received by the intelligent network cardfor direct processing and feedback. Thus, the CPU does not participatein the consensus process, so that the feedback delay of the blockchainintegrated station in the consensus process is reduced.

FIG. 5 is a flowchart of a method for forwarding a transaction based ona blockchain integrated station according to embodiments of the presentdisclosure. The method includes the following steps:

At step S500, when a blockchain integrated station receives atransaction through an intelligent network card, the intelligent networkcard determines other to-be-forwarded nodes.

At step S502, the intelligent network card forwards the transaction tothe other to-be-forwarded nodes.

In the transaction reception stage, in addition to forwarding thereceived transaction, the intelligent network card can also write thereceived transaction into a network card cache to implement the methodshown in FIG. 3 .

Generally, before forwarding and caching the received transaction, theintelligent network card can perform legality verification for thetransaction. The legality verification usually involves some legalityitems to be verified based on a blockchain protocol (for example,signature verification of an account that initiated a transaction).

If the legality verification fails, the intelligent network cardgenerally does not forward the transaction.

The intelligent network card can discard a transaction that failslegality verification. In addition, it should be noted that in an actualapplication, the intelligent network card can also retain a transactionthat fails legality verification, and write the transaction into thenetwork card cache and send the transaction to the CPU for the followingreason: when a node unsuccessfully performs legality verification of atransaction, it does not necessarily mean that the transaction isillegal but can mean that the transaction loses part of data in networktransmission, or an error may occur to the verification of the node. Fora blockchain network as a distributed database, erroneous transactionverification results obtained by a small number of nodes shall notaffect the execution of the transaction. Therefore, even if the nodeunsuccessfully performs verification of a transaction, the node canstill retain the transaction which can be subsequently determined as ato-be-executed transaction by the entire network through consensus inthe consensus stage.

In addition, in embodiments of the present disclosure, if theintelligent network card successfully performs legality verification ofa transaction, the intelligent network card can mark the transaction.Further, the intelligent network card can send the marked transaction tothe CPU. Generally, the CPU can determine whether the transaction passeslegality verification before writing the transaction into the CPU cache.If the transaction has a mark, it indicates that the intelligent networkcard already successfully performs verification, and the CPU does notneed to perform verification again. If the transaction does not have amark, it indicates that the intelligent network card unsuccessfullyperforms verification, and the CPU can choose to record the unsuccessfulverification of the transaction, or to perform verification for thetransaction again.

According to the method shown in FIG. 5 , a blockchain integratedstation includes a CPU and an intelligent network card, and theintelligent network card is a network card having a built-in processoror microprocessor and can perform data computing and processing. Theintelligent network card can replace the CPU to perform transactionforwarding in the transaction reception stage.

According to the embodiments of the present disclosure, the followingtechnical effects can be achieved by transferring operations such astransaction forwarding that needs frequent network interaction withother nodes from the CPU to the intelligent network card.

1. The intelligent network card is specifically in charge of transactionforwarding to offload this part of operation burden for the CPU. In thiscase the operation efficiency of the blockchain integrated stationserving as the node is improved, and the CPU can also execute moretransactions within a unit time, thereby improving throughput.2. In a blockchain forwarding process, the network traffic does not needto flow through the CPU but is received by the intelligent network cardfor direct processing and feedback so that the feedback delay of theblockchain integrated station is reduced.

FIG. 6 is a flowchart of a method for identifying a replay transactionbased on a blockchain integrated station according to embodiments of thepresent disclosure. The method includes the following steps:

At step S600, when a blockchain integrated station receives atransaction through an intelligent network card, the intelligent networkcard compares the currently received transaction with historicallyreceived transactions in a network card cache.

At step S602, if a comparison result indicates that there is ahistorically received transaction the same as the currently receivedtransaction, the intelligent network card determines the currentlyreceived transaction as a replay transaction.

In embodiments of the present disclosure, the intelligent network cardcan compare the currently received transaction with all historicallyreceived transactions one by one to determine whether the currentlyreceived transaction is a replay transaction.

In addition, considering that some historically received transactionsare too old to be replayed, the currently received transaction can becompared with recent historically received transactions.

Specifically, the intelligent network card can write each receivedtransaction into a transaction identification pool in the network cardcache, and take out the historically received transactions with areception time length greater than a designated time length from thetransaction identification pool. The reception time length refers to atime length between a reception time point and a current time point. Theintelligent network card can compare the currently received transactionwith the historically received transactions in the transactionidentification pool.

Further, in an actual application, a transaction usually has a validtime length. If the time is too long between the current time and thetransaction reception time, the transaction will become invalid. It ismeaningless to replay those historically received transactions that aretoo old. Therefore, the above designated time length can be specificallyset to be no less than a valid time length of a transaction.

In embodiments of the present disclosure, the intelligent network cardcan classify those identified replay transactions into a replaytransaction set. The replay transaction set does not participate in theblockchain consensus, or the replay transaction set is not sent to theCPU. Therefore, the replay transaction can be filtered. In addition, theintelligent network card can also discard the replay transaction.

According to the method shown in FIG. 6 , a blockchain integratedstation includes a CPU and an intelligent network card, and theintelligent network card is a network card having a built-in processoror microprocessor and can perform data computing and processing. Theintelligent network card can replace the CPU to perform replaytransaction identification.

According to the embodiments of the present disclosure, the followingtechnical effects can be achieved.

1. The intelligent network card is specifically in charge of identifyinga replay transaction to offload this part of operation burden for theCPU. In this case, the operation efficiency of the blockchain integratedstation serving as a node is improved and the CPU can also execute moretransactions within a unit time, thereby improving throughput.2. The replay transaction can be identified and filtered at theintelligent network card thus the replay transaction generally will notflow through the CPU, so that the replay transaction can be identifiedand filtered more rapidly.

FIG. 7 is a flowchart of a method for identifying a to-be-filteredtransaction based on a blockchain integrated station according toembodiments of the present disclosure. The method includes the followingsteps:

At step S700, when a blockchain integrated station receives atransaction through an intelligent network card, the intelligent networkcard determines whether the currently received transaction satisfies apredetermined filtering condition.

At step S702, if the intelligent network card determines that thecurrently received transaction satisfies the predetermined filteringcondition, the intelligent network card determines the currentlyreceived transaction as a to-be-filtered transaction.

The intelligent network card can discard the identified to-be-filteredtransaction, or retain and classify the to-be-filtered transactions intoa to-be-filtered transaction set. The to-be-filtered transaction setdoes not participate in a blockchain consensus, or is not sent to theCPU. Therefore, the to-be-filtered transaction can be filtered.

In addition, the to-be-filtered transactions mainly involve thefollowing two cases:

1. A service operation type corresponding to a service operationrealized by a transaction is not a service operation type in charge ofthe present node (the blockchain integrated station), nor belong to aservice operation type set corresponding to the present node. Forexample, due to limited transaction processing capability, the presentnode will only selectively execute transactions of some specific serviceoperation types. For another example, some service operation types arewritten into a blacklist of the present node, and the present noderefuses to execute the transactions of these service operation typesbased on the blacklist.

In addition, it should be noted that for a blockchain network of suchdistributed architecture, failure of a small number of nodes to executesome transactions will not affect a world state of the entire blockchainnetwork, and the world state will still be synchronized to each node.

2. A service operation type corresponding to a service operationrealized by a transaction is a service operation type in charge of thepresent node, and belongs to a service operation type set correspondingto the present node. However, specific service operation contentrealized by the transaction are illegal, nor belong to legal operationcontent corresponding to the service operation type. For example, atransaction is used to realize a query operation, but the queryoperation is specifically used to perform repeated meaningless queriesfor a particular parameter value, and therefore the transaction actuallybelongs to an attack transaction for a blockchain network and isillegal. For another example, a transaction is used to perform atransfer operation but the balance of the transferor is insufficient,and the transaction is also illegal. For another example, an account ofa transaction initiator has no operation authority, and thus thetransaction is also illegal.

In addition, according to the method shown in FIG. 7 , a more complexfiltering condition can be configured for the intelligent network card.For example, the following filtering condition can be configured:

(a particular time period) and (initiated by account A) and (sending toaccount B or C for operation).

According to the method shown in FIG. 7 , a blockchain integratedstation includes a CPU and an intelligent network card, and theintelligent network card is a network card having a built-in processoror microprocessor and can perform data computing and processing. Theintelligent network card can replace the CPU to perform to-be-filteredtransaction identification.

According to the embodiments of the present disclosure, the followingtechnical effects can be achieved.

1. The intelligent network card is specifically in charge of identifyinga to-be-filtered transaction to offload this part of operation burdenfor the CPU. In this case, the operation efficiency of the blockchainintegrated station serving as the node is improved and the CPU can alsoexecute more transactions within a unit time, thereby improvingthroughput.2. The to-be-filtered transaction can be identified and filtered at theintelligent network card and thus the to-be-filtered transactiongenerally will not flow through the CPU, so that the to-be-filteredtransaction is identified and filtered more rapidly.

FIG. 8 is a structural schematic diagram of an apparatus for processinga transaction based on a blockchain integrated station according toembodiments of the present disclosure. The apparatus is applied to anintelligent network card of the blockchain integrated station, and theblockchain integrated station further includes a CPU and is any node ofa blockchain network. The apparatus includes:

a caching module 801, configured to, when the blockchain integratedstation receives a transaction through the intelligent network card,write the received transaction into a network card cache;

a consensus interacting module 802, configured to perform consensusinteraction with other nodes of the blockchain network based on thetransaction in the network card cache when the blockchain integratedstation participates in a blockchain consensus; and

a sending module 803, configured to determine a to-be-executedtransaction list according to the consensus result and send theto-be-executed transaction list to the CPU.

FIG. 9 is a structural schematic diagram of an apparatus for processinga transaction based on a blockchain integrated station according toembodiments of the present disclosure. The apparatus is applied to a CPUof the blockchain integrated station, and the blockchain integratedstation further includes an intelligent network card and is any node ofa blockchain network. The apparatus includes:

a chaining executing module 901, configured to execute a transactionbased on the to-be-executed transaction list sent by the intelligentnetwork card and complete transaction chaining.

FIG. 10 is a structural schematic diagram of an apparatus forsynchronizing data based on a blockchain integrated station according toembodiments of the present disclosure. The apparatus is applied to anintelligent network card of the blockchain integrated station, and theblockchain integrated station further includes a CPU and is any node ofa blockchain network. The apparatus includes:

an inquiring module 1001, configured to inquire other nodes aboutwhether there is to-be-synchronized block data;

a pulling module 1002, configured to pull the to-be-synchronized blockdata from other nodes if it is determined that there is theto-be-synchronized block data; and

a providing module 1003, configured to provide the to-be-synchronizedblock data to the CPU.

FIG. 11 is a structural schematic diagram of an apparatus forsynchronizing data based on a blockchain integrated station according toembodiments of the present disclosure. The apparatus is applied to a CPUof the blockchain integrated station, and the blockchain integratedstation further includes an intelligent network card and is any node ofa blockchain network. The apparatus includes:

a synchronizing module 1101, configured to complete data synchronizationbased on the to-be-synchronized block data.

FIG. 12 is a structural schematic diagram of an apparatus for forwardinga transaction based on a blockchain integrated station according toembodiments of the present disclosure. The apparatus is applied to anintelligent network card of the blockchain integrated station, and theblockchain integrated station further includes a CPU and is any node ofa blockchain network. The apparatus includes:

a determining module 1201, configured to determine other to-be-forwardednodes when the blockchain integrated station receives a transactionthrough the intelligent network card; and

a forwarding module 1202, configured to forward the transaction to theother to-be-forwarded nodes.

FIG. 13 is a structural schematic diagram of an apparatus foridentifying a replay transaction based on a blockchain integratedstation according to embodiments of the present disclosure. Theapparatus is applied to an intelligent network card of the blockchainintegrated station, and the blockchain integrated station furtherincludes a CPU and is any node of a blockchain network. The apparatusincludes:

an identifying module 1301, configured to, when the blockchainintegrated station receives a transaction through the intelligentnetwork card, identify the currently received transaction, including:comparing the currently received transaction with historically receivedtransactions in a network card cache; and if a comparison resultindicates that there is a historically received transaction the same asthe currently received transaction, determining the currently receivedtransaction as a replay transaction.

FIG. 14 is a structural schematic diagram of an apparatus foridentifying a to-be-filtered transaction based on a blockchainintegrated station according to embodiments of the present disclosure.The apparatus is applied to an intelligent network card of theblockchain integrated station, and the blockchain integrated stationfurther includes a CPU and is any node of a blockchain network. Theapparatus includes:

an identifying module 1401, configured to, when the blockchainintegrated station receives a transaction through the intelligentnetwork card, identify the currently received transaction, including:determining whether the currently received transaction satisfies apredetermined filtering condition; and if it is determined that thecurrently received transaction satisfies the predetermined filteringcondition, determining the currently received transaction as ato-be-filtered transaction.

Embodiments of the present disclosure further provide a computer deviceincluding at least memory, a CPU, an intelligent network card, andcomputer programs that are stored on the memory and run on theintelligent network card. When executing the programs, the intelligentnetwork card implements the functions of each method in the presentdisclosure.

FIG. 15 is a structural schematic diagram of more specific computerhardware according to embodiments of the present disclosure. The devicecan include: a processor 1510, a memory 1520, an input/output interface1530, a communication interface 1540 and a bus 1550. The processor 1510,the memory 1520, the input/output interface 1530 and the communicationinterface 1540 realize communication connection with each other in thedevice through the bus 1550.

The processor 1510 can be implemented by a general central processingunit (CPU), a microprocessor, an application specific integrated circuit(ASIC), or one or more integrated circuits, or the like to executerelevant programs, so as to implement the technical solutions accordingto the embodiments of the present disclosure.

The memory 1520 can be implemented by a read only memory (ROM), a randomaccess memory (RAM), a static storage device, a dynamic storage device,or the like. The memory 1520 can store an operating system and otherapplication programs. When the technical solutions according to theembodiments of the present disclosure are implemented by software orfirmware, relevant program codes stored in the memory 1520 are invokedand executed by the processor 1510.

The input/output interface 1530 is used to connect aninputting/outputting module, so as to realize information input andoutput. The inputting/outputting module can be configured as a component(not shown) in the device, or can be externally connected to the deviceto provide corresponding functions. The input device can include akeyboard, a mouse, a touch screen, a microphone, various sensors, andthe like, and the output device can include a display, a speaker, avibrator, an indicator light, and the like.

The communication interface 1540 is used to connect a communicationmodule (not shown), so as to realize communication interaction betweenthe device and other devices. The communication module can realizecommunication in a wired manner (such as a USB and a network cable) orin a wireless manner (such as a mobile network, WIFI and Bluetooth).

The bus 1550 includes a channel transmitting information betweendifferent components (such as the processor 1510, the memory 1520, theinput/output interface 1530 and the communication interface 1540) of thedevice.

It should be noted that although the above device only shows theprocessor 1510, the memory 1520, the input/output interface 1530, thecommunication interface 1540 and the bus 1550, the device can furtherinclude other components required for normal operation in a specificimplementation process. In addition, persons skilled in the art canunderstand that the above device can only include components requiredfor the solution according to the embodiments of the present disclosure,rather than all components shown in the drawings.

Embodiments of the present disclosure further provide a computerreadable storage medium storing computer programs, and the programs areexecuted by an intelligent network card to implement functions of eachmethod in the present disclosure.

The computer readable medium includes permanent, non-permanent, mobileand non-mobile media, which can realize information storage by anymethod or technology. The information can be computer readableinstructions, data structures, program modules and other data.Embodiments of the computer storage medium include but not limited to: aphase change random access memory (PRAM), a Static Random Access Memory(SRAM), a Dynamic Random Access Memory (DRAM), and other types of RAMs,Read-Only Memories (ROM), Electrically-Erasable Programmable Read-OnlyMemories (EEPROM), Flash Memories, or other memory technologies,CD-ROMs, digital versatile discs (DVD) or other optical storages,cassette type magnetic tapes, magnetic disk storages, or other magneticstorage devices or any other non-transmission mediums for storinginformation accessible by computing devices. According to the definitionof the specification, the computer readable medium does not includetransitory computer readable media, such as modulated data signals andcarriers.

It can be known from descriptions of the above embodiments that personsskilled in the art can clearly understand that the embodiments of thepresent disclosure can be implemented by means of software and anecessary general hardware platform. Based on such understanding, thetechnical solutions of embodiments of the present disclosure essentiallyor a part contributing to the exited technology can be embodied in theform of a software product, and the computer software product can bestored in a storage medium, such as a ROM/RAM, a diskette or a compactdisk, and includes several instructions for enabling a computer device(such as a personal computer, a server or a network device) to executethe methods of different embodiments or some parts of the embodiments ofthe present disclosure.

The systems, methods, modules or units described in the aboveembodiments can be specifically implemented by a computer chip or anentity, or can be implemented by a product with a particular function. Atypical implementing device can be a computer, and the computer canspecifically be a personal computer, a laptop computer, a cellularphone, a camera phone, a smart phone, a personal digital assistant, amedia player, a navigation device, an email transceiver, a game console,a tablet computer, a wearable device, or a combination of any severaldevices of the above devices.

The embodiments in the present disclosure are described in a progressivemanner, each embodiment focuses on differences from other examples, andsame or similar parts among the embodiments can be referred to eachother. Especially, since apparatus embodiments are basically similar tomethod embodiments, simple descriptions are made to the apparatusembodiments, and relevant parts can be referred to part of thedescriptions of the method embodiments. The apparatus embodimentsdescribed above are merely illustrative, where modules described asseparate members can be or does not have to be physically separated, andfunctions of different modules can be implemented in the same or severalsoftware and/or hardware during implementation of the embodiments of thepresent disclosure. Part or all of the modules can also be selectedaccording to actual requirements to achieve the objectives of thesolution of the embodiment. Persons of ordinary skill in the art canunderstand and implement the solutions without creative work.

The above descriptions are merely specific embodiments of the presentdisclosure. It should be noted that persons of ordinary skill in the artcan also make several improvements and modifications without departingfrom the principles of the embodiments of the present disclosure, andthese improvements and modifications shall also be included in the scopeof protection of embodiments of the present disclosure.

What is claimed is:
 1. A blockchain integrated station, comprising: acentral processing unit (CPU); and an intelligent network card, whereinthe intelligent network card comprises a processor different from theCPU, the blockchain integrated station serves as a blockchain node of ablockchain network, and the intelligent network card is configured to:inquiry other blockchain nodes of the blockchain network on whetherthere is to-be-synchronized block data; in response to determining thatthere is the to-be-synchronized block data, pull the to-be-synchronizedblock data from the other blockchain nodes of the blockchain network;and provide the to-be-synchronized block data to the CPU.
 2. Theblockchain integrated station according to claim 1, wherein the CPU isconfigured to complete data synchronization based on theto-be-synchronized block data.
 3. The blockchain integrated stationaccording to claim 1, wherein the intelligent network card is configuredto write the to-be-synchronized block data into a shared cache betweenthe intelligent network card and the CPU.
 4. The blockchain integratedstation according to claim 3, wherein the CPU is configured to obtainthe to-be-synchronized block data from the shared cache.
 5. Theblockchain integrated station according to claim 1, wherein the CPU iscoupled with one or more CPU caches, and the intelligent network card iscoupled with one or more network card caches, and the intelligentnetwork card is configured to: write one or more transactions into theone or more network card caches; and perform subsequent blockchainconsensus based on the one or more transactions in the one or morenetwork card caches.
 6. The blockchain integrated station according toclaim 1, wherein the processor of the intelligent network card comprisesa build-in processor or microprocessor.
 7. The blockchain integratedstation according to claim 1, further comprising one or more of a smartcontract processing chip or a cryptographic acceleration card.
 8. Acomputer-implemented method, comprising: inquiring, by an intelligentnetwork card of a blockchain integrated station serving as a blockchainnode of a blockchain network, other blockchain nodes of the blockchainnetwork on whether there is to-be-synchronized block data, wherein theblockchain integrated station comprises a central processing unit (CPU)and the intelligent network card, and the intelligent network cardcomprises a processor different from the CPU; in response to determiningthat there is the to-be-synchronized block data, pulling, by theintelligent network card of the blockchain integrated station, theto-be-synchronized block data from the other blockchain nodes; andproviding, by the intelligent network card of the blockchain integratedstation, the to-be-synchronized block data to the CPU of the blockchainintegrated station.
 9. The computer-implemented method according toclaim 8, further comprising: completing, by the CPU of the blockchainintegrated station, data synchronization based on the to-be-synchronizedblock data.
 10. The computer-implemented method according to claim 8,wherein providing, by the intelligent network card of the blockchainintegrated station, the to-be-synchronized block data to the CPU of theblockchain integrated station comprises: writing, by the intelligentnetwork card of the blockchain integrated station, theto-be-synchronized block data into a shared cache between theintelligent network card and the CPU.
 11. The computer-implementedmethod according to claim 10, further comprising: obtaining, by the CPUof the blockchain integrated station, the to-be-synchronized block datafrom the shared cache.
 12. The computer-implemented method according toclaim 10, wherein the CPU is coupled with one or more CPU caches, andthe intelligent network card is coupled with one or more network cardcaches, and the computer-implemented method comprises: writing, by theintelligent network card of the blockchain integrated station, one ormore transactions into the one or more network card caches; andperforming, by the intelligent network card of the blockchain integratedstation, subsequent blockchain consensus based on the one or moretransactions in the one or more network card caches.
 13. The blockchainintegrated station according to claim 1, wherein the processor of theintelligent network card comprises a build-in processor ormicroprocessor, and the blockchain integrated station comprises one ormore of a smart contract processing chip or a cryptographic accelerationcard.
 14. A blockchain system, comprising one or more blockchain nodesof a blockchain network, wherein at least one of the one or moreblockchain nodes is implemented using a blockchain integrated station,wherein the blockchain integrated station comprises: a centralprocessing unit (CPU); and an intelligent network card, wherein theintelligent network card comprises a processor different from the CPU,the blockchain integrated station serves as a blockchain node of theblockchain network, and the intelligent network card is configured to:inquiry other blockchain nodes of the blockchain network on whetherthere is to-be-synchronized block data; in response to determining thatthere is the to-be-synchronized block data, pull the to-be-synchronizedblock data from the other blockchain nodes of the blockchain network;and provide the to-be-synchronized block data to the CPU.
 15. Theblockchain system according to claim 14, wherein the CPU is configuredto complete data synchronization based on the to-be-synchronized blockdata.
 16. The blockchain system according to claim 14, wherein theintelligent network card is configured to write the to-be-synchronizedblock data into a shared cache between the intelligent network card andthe CPU.
 17. The blockchain system according to claim 16, wherein theCPU is configured to obtain the to-be-synchronized block data from theshared cache.
 18. The blockchain system according to claim 14, whereinthe CPU is coupled with one or more CPU caches, and the intelligentnetwork card is coupled with one or more network card caches, and theintelligent network card is configured to: write one or moretransactions into the one or more network card caches; and performsubsequent blockchain consensus based on the one or more transactions inthe one or more network card caches.
 19. The blockchain system accordingto claim 14, wherein the processor of the intelligent network cardcomprises a build-in processor or microprocessor.
 20. The blockchainsystem according to claim 14, wherein the blockchain integrated stationcomprises one or more of a smart contract processing chip or acryptographic acceleration card.